<?php /* Smarty version 2.6.18, created on 2012-02-17 00:44:05
         compiled from index/list.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'cycle', 'index/list.tpl', 50, false),array('function', 'paging', 'index/list.tpl', 96, false),)), $this); ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "common/header.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php if ($this->_tpl_vars['AppUI']->id <= 0): ?>
	<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index/login.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>  
<?php else: ?>
	<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "common/menu.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
    <div class="rightColumn">
    	<div class="boxContent">
        	<div class="contentItem">
                <div class="contentItems">
                	<div class="headerTitle"><h2>Thành viên Ban Quản Trị<?php if (isset ( $_SESSION['admin'] ) && ( $_SESSION['admin'] & 1 << 0 ) > 0): ?> &raquo; <a href="<?php echo @HOST_BACKEND; ?>
index/add">Thêm mới</a><?php endif; ?></h2></div>
                    <div class="secData">
                    	<form id="frmAdmin" name="frmAdmin" method="post" action="<?php echo @HOST_BACKEND; ?>
index/act" enctype="multipart/form-data">
                        	<input type="hidden" name="paction" id="paction" />
                            <input type="hidden" name="pcancelsearch" id="pcancelsearch"/>
                        	<?php if ($this->_tpl_vars['arrResult']): ?>
                                <div class="secActionAndPage">
                                    <div class="actionLink">
                                    	<?php if (isset ( $_SESSION['admin'] )): ?>
                                            <?php if (( $_SESSION['admin'] & 1 << 4 ) > 0): ?>  
                                                <input type="button" onclick="javascript:confirmPending(this.form);" value="Tạm dừng t.k" title="Tạm dừng tài khoản của thành viên BQT"/>
                                            <?php endif; ?>
                                            <?php if (( $_SESSION['admin'] & 1 << 5 ) > 0): ?>
                                            	<input type="button" onclick="javascript:confirmActive(this.form);" value="Mở t.k" title="Mở tài khoản của thành viên BQT"/>
                                            <?php endif; ?>
                                       	<?php else: ?>
                                        	&nbsp;
                                        <?php endif; ?>
                                    </div>
                                    <div class="totalPage"><strong>Tổng số: <?php echo $this->_tpl_vars['intTotal']; ?>
</strong></div>
                                </div>
                            <?php endif; ?>
                            <table width="100%" cellpadding="0" cellspacing="0" border="0">
                                <thead>
                                    <tr>
                                        <?php if ($this->_tpl_vars['arrResult'] && isset ( $_SESSION['admin'] ) && ( ( $_SESSION['admin'] & 1 << 2 ) > 0 )): ?>
                                        	<th class="firstChild" width="30"><input type="checkbox" name="pcheckall" id="pcheckall" onclick="javascript:checkAll(this.form,'padminid[]',this.checked);"/></th>
	                                        <th>Username</th>
                                       	<?php else: ?>
                                        	<th class="firstChild">Username</th>
                                        <?php endif; ?>                                        
                                        <th>Họ &amp; tên</th>
                                        <th>Quyền quản trị</th>
                                        <th>Tình trạng</th>
                                        <?php if ($this->_tpl_vars['arrResult'] && isset ( $_SESSION['admin'] ) && ( ( $_SESSION['admin'] & 1 << 2 ) > 0 )): ?><th width="230">&nbsp;</th><?php endif; ?>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php if ($this->_tpl_vars['arrResult']): ?>
                                        <?php $_from = $this->_tpl_vars['arrResult']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['item']):
?>
                                            <tr class="<?php echo smarty_function_cycle(array('values' => "odd,even"), $this);?>
">
                                            	<?php if (isset ( $_SESSION['admin'] ) && ( ( $_SESSION['admin'] & 1 << 2 ) > 0 )): ?>
                                                	<td align="center" class="firstChild">
                                                    <?php if ($this->_tpl_vars['item']['username'] != 'root'): ?>
                                                    	<input type="checkbox" id="padminid<?php echo $this->_tpl_vars['item']['adminid']; ?>
" name="padminid[]" value="<?php echo $this->_tpl_vars['item']['adminid']; ?>
" onclick="javascript:checkOneItem(this.form, 'pcheckall')"/>
                                                   	
                                                    	<input type="hidden" id="pusername<?php echo $this->_tpl_vars['item']['adminid']; ?>
" name="pusername[<?php echo $this->_tpl_vars['item']['adminid']; ?>
]" value="<?php echo $this->_tpl_vars['item']['username']; ?>
"/>     
                                                  	<?php else: ?>&nbsp;<?php endif; ?></td>
                                                	<td><?php echo $this->_tpl_vars['item']['username']; ?>
</td>
                                               	<?php else: ?>
                                                	<td class="firstChild"><?php echo $this->_tpl_vars['item']['username']; ?>
</td>
                                                <?php endif; ?>
                                                <td><?php echo $this->_tpl_vars['item']['fullname']; ?>
</td>
                                                <td><?php echo $this->_tpl_vars['arrType'][$this->_tpl_vars['item']['type']]; ?>
</td>
                                                <td><?php if ($this->_tpl_vars['item']['status'] == 0): ?>Kích hoạt<?php else: ?>Tạm dừng<?php endif; ?></td>
                                                <?php if (isset ( $_SESSION['admin'] ) && ( $_SESSION['admin'] & 1 << 2 ) > 0): ?>
                                                	<td align="center">
                                                    	<?php if ($this->_tpl_vars['item']['username'] == 'root'): ?>
                                                        	<?php if ($this->_tpl_vars['AppUI']->username == 'root'): ?>
                                                            	<a href="<?php echo @HOST_BACKEND; ?>
index/permission?adminid=<?php echo $this->_tpl_vars['item']['adminid']; ?>
">Phân quyền</a>
                                                            <?php else: ?>
                                                            	Phân quyền
                                                            <?php endif; ?>
                                                        <?php else: ?><a href="<?php echo @HOST_BACKEND; ?>
index/permission?adminid=<?php echo $this->_tpl_vars['item']['adminid']; ?>
">Phân quyền</a>
                                                        <?php endif; ?> | <a href="<?php echo @HOST_BACKEND; ?>
index/edit?adminid=<?php echo $this->_tpl_vars['item']['adminid']; ?>
">Chỉnh sửa</a> | <a href="<?php echo @HOST_BACKEND; ?>
index/achangepass?adminid=<?php echo $this->_tpl_vars['item']['adminid']; ?>
">Thay đổi mật khẩu</a></td>
                                                <?php endif; ?>
                                            </tr>
                                        <?php endforeach; endif; unset($_from); ?>
                                    <?php else: ?>
                                    <?php endif; ?>
                                </tbody>
                            </table>
                            <?php if ($this->_tpl_vars['arrResult']): ?>
                                <div class="secActionAndPage">
                                    <div class="actionLink">
                                    	<?php if (isset ( $_SESSION['admin'] )): ?>
                                            <?php if (( $_SESSION['admin'] & 1 << 4 ) > 0): ?>  
                                                <input type="button" onclick="javascript:confirmPending(this.form);" value="Tạm dừng t.k" title="Tạm dừng tài khoản của thành viên BQT"/>
                                            <?php endif; ?>
                                            <?php if (( $_SESSION['admin'] & 1 << 5 ) > 0): ?>
                                            	<input type="button" onclick="javascript:confirmActive(this.form);" value="Mở t.k" title="Mở tài khoản của thành viên BQT"/>
                                            <?php endif; ?>
                                       	<?php else: ?>
                                        	&nbsp;
                                        <?php endif; ?>
                                    </div>
    								<?php echo smarty_function_paging(array('total' => $this->_tpl_vars['intTotal'],'limit' => $this->_tpl_vars['intLimit'],'offset' => $this->_tpl_vars['intOffset']), $this);?>

                                </div>
                            <?php endif; ?>
                      	</form>
                   	</div>
                </div>
          	</div>
        </div>
    </div>
<?php endif; ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "common/footer.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
                